home *** CD-ROM | disk | FTP | other *** search
- /* PERSISTENCE OF VISION RAYTRACER
-
- ALHAMBRA.INC
-
- Por: SOCRATES RIZQUEZ 1994
-
- ==========================================================================*/
- #include "shapes.inc"
-
- #declare agua1 = texture{
- pigment { color rgb <0.2,0.27,0.3> }
- normal { waves 0.95 frequency 0.9
- scale 0.6 translate <15,0,30> }
- finish { ambient 0.4 phong 0.8 reflection 0.7 }}
-
- #declare agua2 = texture {
- pigment { color rgb <0.4,0.4,0.75> }
- normal { wrinkles 1 scale .015 }
- finish { ambient 0.4 phong 0.8 reflection 0.7 }}
-
- #declare tejas = //para los tejados
- texture { pigment { granite color_map {
- [ 0.0 color rgb <1,1,1> ]
- [ 0.2 color rgb <1,1,1> ]
- [ 0.4 color rgb <0.45,0.45,0.45> ]
- [ 0.6 color rgb <0.7,0.5,0.3> ]
- [ 0.8 color rgb <0.5,0.4,0.3> ]
- [ 1.0 color rgb <1,1,1> ] } scale 12 }
- finish { ambient 0.3 phong 0.75 }}
- texture { pigment { gradient x color_map {
- [ 0.0 color rgb <0,0,0> ]
- [ 0.2 color rgb <0,0,0> ]
- [ 0.2 color rgbf <0,0,0,1> ]
- [ 0.2 color rgbf <0,0,0,1> ] } scale 2.75 }}
-
- #declare piedra = texture { //para suelo de piedras
- pigment { granite color_map {
- [ 0.0 color rgb <1,1,1> ]
- [ 0.1 color rgb <1,1,1> ]
- [ 0.3 color rgb <0.4,0.5,0.3> ]
- [ 0.5 color rgb <0.6,0.5,0.5> ]
- [ 0.8 color rgb <0.4,0.4,0.4> ]
- [ 1.0 color rgb <1,1,1> ] } scale 6 }
- normal { wrinkles 0.9 scale 2 }
- finish { ambient 0.4 phong 1 }}
-
- #declare piedra2 = texture { //para fuente
- pigment { granite color_map {
- [ 0.0 color rgb <1,1,1> ]
- [ 0.2 color rgb <0.8,0.6,0.5> ]
- [ 0.5 color rgb <0.8,0.7,0.5> ]
- [ 0.95 color rgb <0.7,0.7,0.5> ]
- [ 1.0 color rgb <0.6,0.6,0.4> ] } scale 2.5 }
- normal { bumps 0.5 scale .5 }
- finish { ambient 0.25 phong 0.8 }}
-
- #declare piedra3 = texture { //para columnas
- pigment { color rgb <0.8,0.8,0.7> }
- finish { ambient 0.3 phong 0.8 }}
-
- #declare piedra4 = texture { //para arcos redondos
- pigment { leopard color_map {
- [ 0.0 color rgb <0.7,0.6,0.5> ]
- [0.4 color rgb <0.2,0.1,0.06> ]
- [0.6 color rgb <0.4,0.35,0.2> ]
- [0.7 color rgb <0.65,0.6,0.5> ] } scale 0.4 }
- finish { ambient 0.3 }}
-
- #declare piedra5 = texture { //para arcos cuadrados
- pigment { granite color_map { // y escalones
- [ 0.0 color rgb <0.6,0.55,0.45> ]
- [ 0.8 color rgb <0.35,0.25,0.2> ] } scale 4 }
- finish { ambient 0.3 phong 0.2 }}
-
- #declare piedra6 = texture { //para cajon oscuro y caja
- pigment { color rgb <0.25,0.2,0.1> }
- finish { ambient 0.3 }}
-
- #declare piedra7 = texture { // para los leones
- pigment { color rgb <0.28,0.25,0.18> }
- normal { wrinkles 0.5 scale 1.5 }
- finish { ambient 0.3 phong 0.25 }}
-
- #declare piedras = intersection {
- box { <-85,0,-140>,<85,4.3,140> }
- object { Disk_Y scale <35,5,35> inverse }
- box { <-85,-5,-3>,<85,5,3> inverse }
- box { <-3,-5,-120>,<3,5,0> inverse }
- texture { piedra }}
-
- #declare escalon1 = intersection {
- object { Disk_Y scale <40,5,40> }
- object { Disk_Y scale <30,6,30> inverse }}
-
- #declare escalon2 = object { Disk_Y scale <23,5,23> }
-
- #declare escalon3 = union {
- box { <-100,-5,95>,<100,5,120> }
- box { <-30,-5,65>,<30,5,100> }
- box { <-100,-5,-120>,<-80,5,100> }
- box { <80,-5,-120>,<100,5,100> }
- box { <-85,-5,-10>,<-35,5,10> }
- box { <35,-5,-10>,<85,5,10> }
- box { <-10,-5,-120>,<10,5,-35> }}
-
- #declare escalon4 = union {
- object { escalon1 }
- object { escalon2 }
- object { escalon3 }}
-
- #declare escalones = intersection {
- object { escalon4 }
- box { <-110,-6,-3>,<-25,6,3> inverse }
- box { <25,-6,-3>,<110,6,3> inverse }
- box { <-3,-6,-125>,<3,6,-25> inverse }
- texture { piedra5 }}
-
- #declare agua = box { <-85,0,-150>,<85,4.2,140>
- texture { agua1 }
- bounded_by { box { <-86,-1,-151>,<86,5,141> }}}
-
- #declare suelo = union {
- object { piedras }
- object { escalones }
- object { agua }}
-
- #declare pecho = object { Disk_Z scale <1.5,1.5,1.25>
- translate <-4.5,3.3,0> }
-
- #declare cabeza = object { Disk_Z scale <0.9,1.4,1.25> rotate z*304
- translate <-5.2,6,0> }
-
- #declare hueco = intersection {
- box { <-6,-1,-2>,<0,3,2> }
- plane { <1,0,0>,0 rotate -z*83 translate <-21.5,0,0> inverse }
- plane { <1,0,0>,0 rotate -z*22 translate <-5.1,0,0> inverse }
- plane { <1,0,0>,0 rotate -z*157 translate <-0.2,0,0> inverse }}
-
- #declare cuerpo = intersection {
- box { <-6,0,-1.25>,<0,4.7,1.25> }
- plane { <1,0,0>,0 rotate -z*3 translate <-5.4,0,0> inverse }
- plane { <1,0,0>,0 rotate -z*127 translate <5.1,0,0> inverse }
- object { hueco inverse }}
-
- #declare pie = intersection {
- box {<-0.8,0,-1.25>,<0,0.8,1.25> }
- plane { <1,0,0>,0 rotate -z*50 translate <-0.8,0,0> inverse }}
-
- #declare cuello = intersection {
- box {<-5.2,4.5,-1.25>,<-3,6.5,1.25> }
- plane { <1,0,0>,0 rotate -z*165 translate <-2.2,0,0> inverse }}
-
-
- #declare leon1 = union {
- object { pecho }
- object { cabeza }
- object { cuerpo }
- object { cuello }
- object { pie translate <-0.2,0,0> }
- object { pie translate <-5.2,0,0> }}
-
- #declare leon = intersection {
- object { leon1 }
- object { Disk_X scale <20,2.7,0.45> inverse }
- translate <-8.5,0,0> texture { piedra5 } }
-
- #declare fuente1 = difference {
- object { Disk_Y scale <15,1,15> }
- box { <-7.5,-4,-7.5>,<7.5,4,7.5> inverse }
- box { <-7.5,-4,-7.5>,<7.5,4,7.5> rotate y*30 inverse }
- box { <-7.5,-4,-7.5>,<7.5,4,7.5> rotate y*60 inverse }
- bounded_by { object { Disk_Y scale <20,5,20> }} scale <1.25,2,1.25>
- texture { piedra2 }}
-
- #declare surt1 = object { torus { 4.3,0.18 }
- rotate x*90 translate <-30,2,0>
- scale <0.75,2.13,0.7>
- bounded_by { sphere { <-30,2,0>,15 }}}
-
- #declare surt2 = intersection {
- object { surt1 }
- plane { <1,0,0>,0 translate <-22.5,0,0> }
- texture { agua2 }}
-
- #declare fuente2 = union {
- object { fuente1 translate <0,6.5,0> }
- object { leon }
- object { leon rotate y*30 }
- object { leon rotate y*60 }
- //object { leon rotate y*90 }
- object { leon rotate y*120 }
- object { leon rotate y*150 }
- object { leon rotate y*180 }
- object { leon rotate y*210 }
- object { leon rotate y*240 }
- object { leon rotate y*270 }
- object { leon rotate y*300 }
- object { leon rotate y*330 }
- scale 1.5 translate <0,5.25,0> }
-
- #declare surt = union {
- object { surt2 }
- object { surt2 rotate y*30 }
- object { surt2 rotate y*60 }
- //object { surt2 rotate y*90 }
- object { surt2 rotate y*120 }
- object { surt2 rotate y*150 }
- object { surt2 rotate y*180 }
- object { surt2 rotate y*210 }
- object { surt2 rotate y*240 }
- object { surt2 rotate y*270 }
- object { surt2 rotate y*300 }
- object { surt2 rotate y*330 }}
-
- #declare surt3 = intersection {
- object { torus { 2,0.175 } rotate x*90 rotate y*35
- scale <1,5,1> translate <0,12,0> texture { agua2 }}
- plane { y,12 inverse }
- bounded_by { sphere { <0,12,0>,11 }}}
-
- #declare fuente = union {
- object { fuente2 }
- object { surt }
- object { surt3 }}
-
- #declare columna = object { Disk_Y scale <0.6,15,0.6> translate <0,15,0>
- bounded_by {
- object { Disk_Y scale <0.7,16,0.7> translate <0,15,0> }}}
-
- #declare columna1 = union {
- object { columna translate <-84,0,0> }
- object { columna translate <-72.5,0,0> }
- object { columna translate <-60,0,0> }
- object { columna translate <-58,0,0> }
- object { columna translate <-42,0,0> }
- object { columna translate <-40,0,0> }
- object { columna translate <-24.5,0,0> }
- texture { piedra3 }}
-
- #declare arco1 = union {
- box { <-4.5,-15,-2>,<4.5,0,2> }
- object { Disk_Z scale <4.5,4.5,2> }}
-
- #declare arco2 = union {
- box { <-6,-15,-2>,<6,0,2> }
- object { Disk_Z scale <6,6,2> }}
-
- #declare frontal1 = intersection {
- box { <-85,28,-1>,<-24,60,1> }
- object { arco1 translate <-78.5,40.5,0> inverse }
- object { arco1 translate <-66.5,40.5,0> inverse }
- object { arco2 translate <-50,39,0> inverse }
- object { arco2 translate <-32,39,0> inverse }
- bounded_by { box { <-86,27,-2>,<-23,61,2> }}
- texture { piedra4 pigment { scale .7 }}}
-
- #declare frontal2 = union {
- box { <-85,30,-1.5>,<-82,60,1.5> }
- box { <-75,30,-1.5>,<-70,60,1.5> }
- box { <-63,30,-1.5>,<-55,60,1.5> }
- box { <-45,30,-1.5>,<-37,60,1.5> }
- box { <-27,30,-1.5>,<-24,60,1.5> }
- box { <-85,57,-1.5>,<-24,61,1.5> }
- bounded_by { box { <-86,29,-2>,<-23,62,2> }}
- texture { piedra5 }}
-
- #declare lateral = union {
- object { columna1 }
- object { frontal1 }
- object { frontal2 }
- box { <-85,61,-1.5>,<-24,70,1.5> texture { piedra6 }}}
-
- #declare lateral1 = object { lateral translate <54.5,0,0> rotate y*90 }
-
- #declare arcos = union {
- object { lateral translate <0,0,100> }
- object { lateral rotate y*180 translate <0,0,100> }
- object { lateral1 translate <-86.5,0,68> }
- object { lateral1 translate <86.5,0,68> }
- object { lateral1 translate <-86.5,0,7> }
- object { lateral1 translate <86.5,0,7> }}
-
- #declare columna2 = union {
- object { columna translate <-21,0,100> }
- object { columna translate <-19.5,0,100> }
- object { columna translate <-9,0,100> }
- object { columna translate <9,0,100> }
- object { columna translate <19,0,100> }
- object { columna translate <21,0,100> }
- texture { piedra3 }}
-
- #declare arco3 = union {
- box { <-4,-15,-2>,<4,0,2> }
- box { <-2.828,-2.828,-2.828>,<2.828,2.828,2.828>
- rotate y*45 rotate x*90 scale <1,3,1> }}
-
- #declare frontal3 = intersection {
- box { <-23,28,99>,<23,60,101> }
- object { arco3 translate <-14,38,100> inverse }
- object { arco3 translate <-4,38,100> inverse }
- object { arco3 translate <0,40,100> inverse }
- object { arco3 translate <4,38,100> inverse }
- object { arco3 translate <14,38,100> inverse }
- bounded_by { box { <-24,27,98>,<24,61,102> }}
- texture { piedra4 pigment { scale 0.8 }}}
-
- #declare frontal4 = union {
- box { <-24,30,98.5>,<-17,60,101.5> }
- box { <-11,30,98.5>,<-7,40,101.5> }
- box { <7,30,98.5>,<11,40,101.5> }
- box { <17,30,98.5>,<24,60,101.5> }
- box { <-24,57,98.5>,<24,61,101.5> }
- bounded_by { box { <-25,29,98>,<25,62,102> }}
- texture { piedra5 }}
-
- #declare frontal5 = union {
- object { columna2 }
- object { frontal3 }
- object { frontal4 }}
-
- #declare frontal = union {
- object { frontal5 scale <.8,1,1> }
- object { frontal5 translate <0,0,-15> scale <.9,1,1> }
- object { frontal5 translate <0,0,-30> }
- box { <23,50,70>,<24,70,100> }
- box { <-24,61,68.5>,<24,70,110> texture { piedra6 }}}
-
- #declare hor = intersection {
- box { <-150,70,95>,<150,100,140> }
- plane { <0,0,1>,0 rotate x*56 translate <0,71,95 > inverse }
- bounded_by { box { <-151,69,94>,<151,101,141> }}
- texture { tejas }}
-
- #declare izq = intersection {
- box { <-125,70,-100>,<-80,100,150> }
- plane { <1,0,0>,0 rotate z*56 translate <-80,71,0> }
- bounded_by { box { <-126,69,-101>,<-79,101,151> }}
- texture { tejas rotate y*90 }}
-
- #declare der = intersection {
- box { <80,70,-100>,<125,100,150> }
- plane { <1,0,0>,0 rotate z*304 translate <80,71,0> inverse }
- bounded_by { box { <79,69,-101>,<126,101,151> }}
- texture { tejas rotate y*90 }}
-
- #declare centro = intersection {
- box { <-30,70,65>,<30,110,150> }
- plane { <1,0,0>,0 rotate z*320 translate <-30,71,0> inverse }
- plane { <1,0,0>,0 rotate z*40 translate <30,71,0> }
- plane { <0,0,1>,0 rotate x*40 translate <0,71,65> inverse }
- bounded_by { box { <-31,69,64>,<31,111,151> }}
- texture { tejas }}
-
- #declare tejado = union {
- object { hor }
- object { der }
- object { izq }
- object { centro }}
-
- #declare torre1 = intersection {
- box { <-40,125,-40>,<40,170,40> }
- plane { <1,0,0>,0 rotate z*315 translate <-40,125.6,0> inverse }
- plane { <1,0,0>,0 rotate z*45 translate <40,125.6,0> }
- plane { <0,0,1>,0 rotate x*45 translate <0,125.6,-40> inverse }
- bounded_by { box { <-41,124,-41>,<41,171,41> }}
- texture { tejas }}
-
- #declare torre = union {
- object { torre1 }
- box { <-40,124.9,-40>,<40,125,40> pigment { rgb <0,0,0> }}
- box { <-33,70,-33>,<33,125,33>
- texture { piedra5 }}
- bounded_by { box { <-41,69,-41>,<41,171,41> }} }
-
- #declare caja = union {
- box { <-96,0,109>,<96,70,110>
- bounded_by { box { <-97,-1,108>,<97,71,111> }}}
- box { <-96,0,-100>,<-95,70,110>
- bounded_by { box { <-97,-1,-101>,<-94,71,111> }}}
- box { <95,0,-100>,<96,70,110>
- bounded_by { box { <94,-1,-101>,<95,71,111> }}}
- texture { piedra6 }}
-
- #declare planta = union {
- box { <-100,69.9,-100>,<-80,70,120> }
- box { <-100,69.9,95>,<100,70,120> }
- box { <80,69.9,-100>,<100,70,120> }
- box { <-30,69.9,65>,<30,70,120> }
- pigment { color rgb <0,0,0> }}
-
- #declare patio = union {
- object { suelo }
- object { fuente }
- object { arcos }
- object { frontal }
- // object { frontal rotate y*180 translate <0,0,20> }
- object { tejado }
- object { planta }
- object { torre translate <-95,-5,205> }
- object { torre translate <95,-5,205> }
- object { caja }}
-